/**
 * @file sq_list.h
 * @brief 
 * @author lwl (lwl510ll@163.com)
 * @version 1.0
 * @date 2021-09-01
 * 
 * @copyright Copyright (c) 2021  LWL
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2021-09-01 <td>1.0     <td>LWL    <td>内容
 * </table>
 */
#ifndef SQ_LIST_H
#define SQ_LIST_H

typedef int elem;

typedef struct SqListElem{
    elem data;
    struct SqListElem *sq_list_next;
}SqListElem;

class SqList {
public:
    SqList();
    ~SqList();
    bool CreateHead(int length);
    bool CreateTail(int length);
    bool InsertNode(int pos, int value);
    bool QueryValue(elem data, int *pos);
    bool GetPosValue(int pos, int *value);
    bool DeletePos(int pos);
    int  ListLength();
    void PrintAllValue();
    SqList static *SortSqList(const SqList *oriSqlist); 
private:
    SqListElem *sq_list_header;
    int sq_list_length;
};

#endif // !SQ_LIST_H